package com.example.controller.report;

import com.example.common.result.Result;
import com.example.entity.report.PengCheng.PCJMVo;
import com.example.service.report.PengChengReportService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Api(tags = "朋诚报表")
@Slf4j
@RequestMapping("/api/pengChengReport")
public class PengChengReportController {

    @Autowired
    private PengChengReportService reportService;

    @ApiOperation("朋诚报表")
    @PostMapping("pcReport")
    public Result<PCJMVo> pcReport() {
        PCJMVo res = new PCJMVo();
        res.setTopJM(reportService.topJM());
        res.setMoctyJM(reportService.moctyJM());
        res.setLineChartJM(reportService.lineChartJM());
        return Result.success(res);
    }

}
